layui.use('table', function() {
	var table = layui.table;
	
	
	var $ = layui.$, active = {
		
		reload: function() {
			var csLoding=layer.msg('数据加载中...', {
				icon: 16,
				shade: 0.3,
				success: function() {
					var logisname = $('#logisname').val();
					var logis_no = $('#logis_no').val();
				
		
					//执行重载
					table.reload('idTest', {
						page: {
							curr: 1 //重新从第 1 页开始
						},
						where: {
							key: {
								logisname:logisname,
								logis_no:logis_no
							}
						},
						done: function(){
						     layer.close(csLoding)
						}
					});
				}
			})
			
		}
		
		
	}
	$('.right-center #ScreenBnt').on('click', function() {
		var type = $(this).data('type');
		active[type] ? active[type].call(this) : '';
	});
	var csLoding=layer.msg('数据加载中...', {
		icon: 16,
		shade: 0.3,
		success: function() {
			table.render({
				elem: '#centet-cen',
				url: listSrc,
				height: $(".center-tab").height(),
				id:'idTest',
				response: {
		  			statusCode: 1, //成功的状态码，默认：0
				},
				page:true,
				cols: [
					[ //标题栏
						{
							field: 'id',
							title: 'ID',
							width: 60
						}, {
							field: 'logis_order_id',
							title: '订单号',
							width: 200
						}, {
							field: 'logisname',
							title: '物流公司',
							width: 200
						}, {
							field: 'logis_no',
							title: '运单号'
						}
					]
				],
				limit: 20,
				done: function(){
				  layer.close(csLoding)
				}
			});
		}
	})
})


layui.use(['form', 'layedit', 'laydate'], function(){
	 var form = layui.form,layer = layui.layer,layedit = layui.layedit,laydate = layui.laydate;
	laydate.render({
		elem: '#start'
	});
	laydate.render({
		elem: '#end'
	});
})


$(function(){
	
	$("#Expbnt").click(function(){
		$("#screen-form").attr("action",ExpSrc);
	})
	
})
